<?php

namespace App\Models;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class WxUsers extends Common
{
    protected $guarded = [];

    /**
     * 类别表
     */
    protected $table = 'wx_users';
    public      $timestamps = false;

    /*
     * 企业状态默认值
     * */
    const STATIC_COMPANY = 1;

    /**
     * 允许批量赋值的字段
     * */
    protected $fillable = [];

    /**
     * 隐藏字段
     * */
    protected $hidden = [];
    /**
     * @param array $where
     * @return array
     * @name 根据条件获取一条数据
     * @user IHammer
     */
    public static function getInfo($where=array()){
        $res = self::where($where)->first();
        if($res){
            return $res->toArray();
        }
        return [];
    }
}
